//
// Created by Administrator on 2022/10/11.
//

#include <pthread.h>
#include <atomicvar.h>

#define thread_err 0
#define thread_ok  1

//获取读锁
int rwlock_rdlock(pthread_rwlock_t *lock);
//获取写锁
int rwlock_wrlock(pthread_rwlock_t *lock);
//
int rwlock_unlock(pthread_rwlock_t *lock);
// 获取线程锁
int mutex_lock(pthread_mutex_t *lock);
// 释放线程锁
int mutex_unlock(pthread_mutex_t *lock);